package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.UserBean;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface IUserMapper extends BaseMapper<UserBean> {

    public void addRole(@Param("userId") Integer userId,
                        @Param("roleIdArray") Integer[] roleIdArray);

    @Delete("delete from t_user_role where fk_userId = #{userId}")
    void delRole(Integer userId);


}
